package edu.bw.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import edu.bw.utils.PermissionDeserializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateRoleForm {

    private Integer id;

    private String roleName;

    @JsonDeserialize(using = PermissionDeserializer.class) //序列化 把 json 字符串转成 java 对象 这里是转化为字符串
    private String permissions;
    /*private List<Integer> permissions; 如果用这种方式需要将sql语句中的permissions里面的列表进行foreach遍历*/
    private String desc;
}
